package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.entity.dto.AdminModuleRole;
import com.qf.mapper.AdminModuleRoleMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class AdminModuleRoleService extends ServiceImpl<AdminModuleRoleMapper, AdminModuleRole> {

    @Transactional(readOnly = true)
    public List<AdminModuleRole> getByRoleId(Long roleId) {
        QueryWrapper<AdminModuleRole> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(AdminModuleRole::getRoleId, roleId);
        return this.list(wrapper);
    }
}